2
실습 4: 적대적 탐색 최적화
PolyU COMP55112026-02-2

히어리스틱 1: 위치 전략

A standard Minimax AI only knows it has won when it forms 5-in-a-row. Until that very last moment, every spot on the board often looks "equal" (score 0), causing it to move randomly in the early game.

핵심 개념

  • 모든 빈 칸이 동일한 것은 아닙니다. A stone played in the corner is weak; it has fewer directions to expand.
  • 중앙에 놓인 돌은 강력합니다. 세 방향—수직, 수평, 대각선—을 동시에 통제하기 때문입니다.중앙 is powerful. It controls vertical, horizontal, and diagonal lines simultaneously.
  • 목표: Encourage the AI to control the center even before it sees a winning line.

구현 방법: "히트맵"

Instead of calculating "centrality" geometry in real-time (which is slow), we pre-define a 조회 테이블.

This is a 2D matrix matching the board size. Higher numbers indicate more valuable strategic positions. When evaluate_board함수가 실행될 때, AI가 놓은 각 돌에 대한 값을 단순히 조회하면 됩니다.